ARR = [1, 2, 'a']

# Retrieve all fruits from basket that are of the specified kind.
def fruits_of_kind(*kind)  
  ARR.each do |x|
    val = kind.each do |y|
      break true if x == y
    end
    puts val    
  end
end

#system "gem install buildr"

require 'rexml/document'
xml =
%Q#
<?xml version="1.0" encoding="UTF-8"?>
<root>
  <child id="1">
    <grandchild>1</grandchild>
    <grandchild>1</grandchild>
    <grandchild>1</grandchild>
  </child>
  <child id="2">
    <grandchild>1</grandchild>
    <grandchild>1</grandchild>
    <grandchild>1</grandchild>
  </child>
</root>
#
doc = REXML::Document.new(xml)
doc.elements.each('/root') { |e|
   e.elements.each('./child/grandchild') { |inner_e|
     puts inner_e
   }
}
puts  "p".to_sym


